package com.sankuai.xz.postoffice.web;

import com.sankuai.xz.postoffice.web.entity.MonthBill;
import com.sankuai.xz.postoffice.web.service.MonthBillService;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class Main {

    ClassPathXmlApplicationContext context = null;

    @Before
    public void init() {
        context = new ClassPathXmlApplicationContext("classpath:spring.xml");
    }

    @Test
    public void test() {
        MonthBillService monthBillService = context.getBean(MonthBillService.class);
        List<MonthBill> list = monthBillService.list(null);
        list.forEach(System.out::println);
    }
}
